Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Packaging: Split setup.py into setup.py and pyproject.toml for PEP 517 Compliance #657

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

michael-mue
Copy link

@michael-mue michael-mue commented Jan 9, 2025

Description

This PR splits the setup.py file into setup.py and pyproject.toml to adhere to PEP 517 and modern packaging standards. This change facilitates better build isolation, dependency specification, and aligns with the latest Python packaging practices.

Changes made

  • Created a pyproject.toml file containing build system requirements and project metadata.
  • Simplified setup.py to focus on building extensions and registering custom commands.
  • Ensured that all existing setup configurations are appropriately transferred to pyproject.toml.
  • Updated README with new install from source instructions

Motivation

  • Aligns cornac with modern packaging standards and simplifies dependency installation.
  • Enhances compatibility with tools like uv and pixi that resolve dependencies simultaneously.
  • Improves compatibility with tools like pip and build that rely on pyproject.toml.
  • Simplifies the source installation process by eliminating the need to pre-install build dependencies (pip3 install git+https://github.com/PreferredAI/cornac.git works without requiring pip3 install Cython numpy scipy).
  • Improves build reproducibility and isolation.

Testing

  • All tests pass locally.
  • Built the package locally using the new configuration without issues.

Notes

  • No changes to the core functionality of the package.
  • All existing tests and CI configurations should remain valid.

Please let me know if there are any questions or if further changes are needed.

@michael-mue michael-mue closed this Jan 9, 2025
@michael-mue michael-mue reopened this Jan 9, 2025
@tqtg tqtg requested a review from darrylong January 11, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant